﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;

namespace MiniStock.Entities.Stock
{
    [ComplexType]
    [DataContract(IsReference = true)]
    public class Address : ICloneable
    {
        [DataMember]
        public string State { get; set; }
        [DataMember]
        public string City { get; set; }
        [DataMember]
        public string StreetName { get; set; }
        [DataMember]
        public string StreetNumber { get; set; }
        
        public object Clone()
        {
            return new Address
                       {
                           State = this.State,
                           City = this.City,
                           StreetName = this.StreetName,
                           StreetNumber = this.StreetNumber,
                       };
        }
    }
}
